package com.northpool.operator.http.bean;

import com.northpool.operator.bean.ParamBean;

import javax.xml.bind.annotation.*;
import java.util.List;

@XmlRootElement(name = "statusApi")
@XmlAccessorType(XmlAccessType.FIELD)
public class StatusApiBean {
    @XmlElement(
            name = "url"
    )
    String url;
    @XmlElement(
            name = "method"
    )
    RequestMethodEnum method;
    @XmlElement(
            name = "timeout"
    )
    Integer timeout = 3000;
    @XmlElement(
            name = "interval"
    )
    Integer interval = 1000;
    @XmlElement(
            name = "errorTimes"
    )
    Integer errorTimes = 3;
    @XmlElementWrapper(
            name = "startParam"
    )
    @XmlElement(
            name = "param"
    )
    List<ParamBean> startParam;
    @XmlElementWrapper(
            name = "headers"
    )
    @XmlElement(
            name = "header"
    )
    List<HeaderBean> headers;
    @XmlElement(
            name = "body"
    )
    String body;
    @XmlElement(
            name = "successExp"
    )
    String successExp;
    @XmlElement(
            name = "faultExp"
    )
    String faultExp;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public RequestMethodEnum getMethod() {
        return method;
    }

    public void setMethod(RequestMethodEnum method) {
        this.method = method;
    }

    public Integer getInterval() {
        return interval;
    }

    public void setInterval(Integer interval) {
        this.interval = interval;
    }

    public Integer getErrorTimes() {
        return errorTimes;
    }

    public void setErrorTimes(Integer errorTimes) {
        this.errorTimes = errorTimes;
    }

    public Integer getTimeout() {
        return timeout;
    }

    public void setTimeout(Integer timeout) {
        this.timeout = timeout;
    }

    public List<ParamBean> getStartParam() {
        return startParam;
    }

    public void setStartParam(List<ParamBean> startParam) {
        this.startParam = startParam;
    }

    public List<HeaderBean> getHeaders() {
        return headers;
    }

    public void setHeaders(List<HeaderBean> headers) {
        this.headers = headers;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public String getSuccessExp() {
        return successExp;
    }

    public void setSuccessExp(String successExp) {
        this.successExp = successExp;
    }

    public String getFaultExp() {
        return faultExp;
    }

    public void setFaultExp(String faultExp) {
        this.faultExp = faultExp;
    }
}
